package com.crm.service.customerManager;

import com.crm.model.entity.customerManager.CustomerReceive;
import com.crm.model.qo.customerManager.AnalyseCustomerQO;

import java.util.List;

/**
 * @ Author ：pym
 * @ Date   ：2021/1/28 16:31
 */
public interface CustomerReceiveDbService {
    /**
     * 客户领取量
     * @param accountId
     * @param customerPoolId
     * @return
     */
    long selectCustomerReceiveCount(String accountId, String customerPoolId);

    /**
     * 同一客户领取的最新一条记录信息
     * @param accountId
     * @param customerPoolId
     * @return
     */
    CustomerReceive selectCustomerReceiveNew(String accountId, String customerPoolId);

    /**
     * 插入领取记录
     * @param customerReceive
     * @return
     */
    Boolean insertCustomerReceive(CustomerReceive customerReceive);

    /**
     * 根据领取人id查询领取的客户id
     * @param qo
     * @return
     */
    List<Long> getReceiveListByUserId(AnalyseCustomerQO qo);
}
